﻿<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" charset="utf-8" src="jquery-1.3.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="jquery.validate.js"></script>
<script>

        $(document).ready(function()    {
            $('#form1').validate();
        });
		
		
	function dodisable()
{
document.form1.f_lop.disabled="true";
document.form1.f_hoahong.disabled="true";
document.form1.f_nguoitao.disabled="true";
document.form1.f_thucthu.disabled="true";
}
	function changett($gt)
	{
		if ($gt == 0)
		{
			
			document.form1.f_trangthai.value = 3;
		}
		if ($gt > 0)
		{
			
			document.form1.f_trangthai.value = 2;
		}
	}
function doenable($trangthai)
{
	if($trangthai ==1)
	{
	document.form1.f_hoahong.disabled = false;
	}else
	{
	document.form1.f_hoahong.disabled = true;
	}
}
function doenable2($trangthai2)
{
	if($trangthai2 ==2)
	{
	document.form1.f_lop.disabled = false;
	}else
	{
	document.form1.f_lop.disabled = true;
	}
}
function thucthu()
{
	if (document.form1.f_tienhp.value == '')
	{
		document.form1.f_tienhp.value = 0;
	}
	if (document.form1.f_tiengt.value == '')
	{
	document.form1.f_tiengt.value=0;
	}
	if (document.form1.f_tiencd.value == '')
	{
	document.form1.f_tiencd.value=0;
	}
	document.form1.f_thucthu.value=parseFloat(document.form1.f_tienhp.value) - parseFloat(document.form1.f_tiengt.value) + parseFloat(document.form1.f_tiencd.value);

}
</script>
</head>
<body  onload="dodisable();">
{body}
</body>
	